<template>
  <div class="d2-layout-header-aside-group">
    <!-- 半透明遮罩 -->
    <div class="d2-layout-header-aside-mask"></div>
    <!-- 主体内容 -->
    <div class="d2-layout-header-aside-content" flex="dir:top">
      <!-- 顶栏 -->
      <div class="d2-theme-header" flex-box="0" flex>
        <!-- <d2-menu-header flex-box="1"/> -->
        <!-- 顶栏右侧 -->
        <!-- <d2-menu-header flex-box="1"/> -->
        <div class="no-select" flex-box="1"></div>
        <div class="d2-header-right" flex-box="0">
          <d2-header-fullscreen />
          <d2-header-locales />
          <!-- <d2-header-user :isShowinfo="false" /> -->
        </div>
      </div>
      <!-- 下面 主体 -->
      <div class="d2-theme-container" flex-box="1" flex>
        <!-- 主体 侧边栏 -->
        <div class="d2-main">
          <el-image class="d2-main-image" :src="`${$baseUrl}image/verify_doing.png`"></el-image>
          <h1 class="d2-main-title"> {{$t('page-register.form.underReview')}}</h1>
          <div class="d2-main-text">
            <p>{{$t('page-register.form.tips25')}}</p>
            <p>{{$t('page-register.form.tips26')}}{{email}}{{$t('page-register.form.tips27')}}</p>
          </div>
          <el-col :span="24" class="footer-btn">
            <el-button type="success" @click="againsubmitForm">{{$t('page-register.form.backHome')}}</el-button>
          </el-col>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import d2HeaderFullscreen from "../../../layout/header-aside/components/header-fullscreen";
import d2HeaderLocales from "../../../layout/header-aside/components/header-locales";
import d2HeaderUser from "../../../layout/header-aside/components/header-user";
import { mapState, mapGetters, mapActions } from "vuex";

import mixinSearch from "../../../layout/header-aside/mixins/search";
import r from 'highlight.js/lib/languages/r';
export default {
  name: "d2-layout-header-aside",
  mixins: [mixinSearch],
  components: {
    d2HeaderFullscreen,
    d2HeaderLocales,
    d2HeaderUser,
  },
  data() {
    return {
      email:"",
      regStatus: 0,
      // [侧边栏宽度] 正常状态
      asideWidth: "200px",
      // [侧边栏宽度] 折叠状态
      asideWidthCollapse: "65px",
    };
  },
  computed: {
    ...mapState("d2admin", {
      keepAlive: (state) => state.page.keepAlive,
      grayActive: (state) => state.gray.active,
      transitionActive: (state) => state.transition.active,
      asideCollapse: (state) => state.menu.asideCollapse,
      asideTransition: (state) => state.menu.asideTransition,
    }),
    ...mapState("d2admin/user", {
      user: "info",
    }),
    ...mapGetters("d2admin", {
      themeActiveSetting: "theme/activeSetting",
    }),
    /**
     * @description 最外层容器的背景图片样式
     */
    styleLayoutMainGroup() {
      return this.themeActiveSetting.backgroundImage
        ? {
          backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')`,
        }
        : {};
    },
  },
  created(){
    this.email=this.$route.query.email
  },
  mounted() {
  },
  methods: {
    againsubmitForm() {
      this.$router.push({
        name: 'login'
      })
    },
    returnStart() {
      try {
        if (this.user.mch.regStatus == 0) {
          this.regStatus = 0
          return this.$t('page-register.form.underReview')
        } else if (this.user.mch.regStatus == 2) {
          this.regStatus = 2
          return this.$t('page-register.form.Hasbeenrejected')
        } else if (this.user.mch.regStatus == 3) {
          return  this.$t('page-register.form.forbidden')
        } else {
          return  this.$t('page-register.form.unknownerror')
        }
      } catch (error) {
        this.$router.push({
          path: "/"
        })
      }

    },
    ...mapActions("d2admin/menu", ["asideCollapseToggle"]),
    /**
     * 接收点击切换侧边栏的按钮
     */
    handleToggleAside() {
      this.asideCollapseToggle();
    },
  },
};
</script>

<style lang="scss" scoped>
.d2-main {
  margin: 0px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  .d2-main-title {
    color: rgba(255, 149, 149, 100);
    font-size: 40px;
  }
  .d2-main-text {
    color: rgba(123, 123, 123, 100);
    font-size: 26px;
  }
  .d2-main-image {
    height: 350px;
    width: 350px;
    border-radius: 50%;
  }
}
.footer-btn {
  display: flex;
  justify-items: center;
  justify-content: center;
  margin-bottom: 100px;
  margin-top: 50px;
}
.d2-header-right{
    padding-right: 30px;
}
</style>
<style lang="scss">
// 注册主题
@import "~@/assets/style/theme/register.scss";
</style>
